#include <head.h>

void * Func_pthread(void * arg)
{
    while (1)
    {
        sleep(1);
        printf("你好\n");
    }
    
}


int main(int argc, char const *argv[])
{
    pthread_t tid;

    pthread_create(&tid ,NULL ,Func_pthread , NULL);

    pthread_detach(tid);

    getc(stdin);
    pthread_cancel(tid);
    printf("已终止\n");
    
    return 0;
}